package com.yang.mall.controller;


import com.yang.mall.dto.BannerDTO;
import com.yang.mall.entity.OLResponse;
import com.yang.mall.service.IBannerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 * 广告表 前端控制器
 * </p>
 *
 * @author kadorlin
 * @since 2022-10-21
 */
@Api(tags = "【小程序】轮播图模块")
@RestController
@RequestMapping("/h5/banner")
@CrossOrigin(origins = "*", methods = {RequestMethod.POST, RequestMethod.GET, RequestMethod.OPTIONS})
public class BannerController {

    @Resource
    private IBannerService bannerService;

    @ApiOperation("List通过bannerDTO查询")
    @GetMapping("/getList")
    public OLResponse getListByBannerDTO(BannerDTO bannerDTO){
        return new OLResponse().success(bannerService.getListByBannerDTO(bannerDTO));
    }

}
